/**
 * @Project Name:sung-app-server
 * @Package Name:cn.hoofungson.example.sung.app.server.controller
 * @Since JDK 1.8
 */
package cn.hoofungson.example.sung.app.server.controller;

import cn.hoofungson.example.sung.app.server.domain.Article;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 文章控制器
 * @Author 胡松 hoofungson@163.com
 * @Date 2018-01-04 13:48
 * @Version V1.0
 */
@RestController
@RequestMapping(value = "/article")
public class ArticleController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @GetMapping
    public List<Article> articles(){
        List<Article> articles = new ArrayList<>();
        articles.add(new Article(3201L,"文章3201"));
        articles.add(new Article(3202L,"文章3202"));
        articles.add(new Article(3203L,"文章3203"));
        articles.add(new Article(3204L,"文章3204"));
        articles.add(new Article(3205L,"文章3205"));

        return articles;
    }
}
